package com.sunni.service;

import com.sunni.entity.Book;
import com.sunni.entity.Borrow;

import java.util.List;

public interface BookService {
    List<Book> findAll(Integer page);
    Integer getPageTotal();

    /**
     * 操控Borrow表
     * @return
     */
    boolean addBorrow(Integer bookId,Integer readId);
    List<Borrow> findAllByReaderid(Integer readerId,Integer page);
    Integer getPageCountBorrowByReaderid(Integer readerId);

    Integer getPageCountBorrowByState0(Integer state);
    List<Borrow> findAllByState0(Integer state0,Integer page);
    Integer handleByBorrowid(Integer borrowId,Integer state,Integer adminId);


}
